<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>

        /* 
            给这个盒子颜色宽高，让他形成一个长方形
            另一个，一直用伪元素创建出来，靠定位过去
        */
        .box {
            background: red;
            height: 100px;
            position: relative;
            width: 20px;
            margin-left: 50px;
        }

        .box:after {
            background: red;
            content: "";
            height: 20px;
            left: -40px;
            position: absolute;
            top: 40px;
            width: 100px;
        }
    </style>
</head>

<body>
    <div class="box"></div>
</body>

</html>